/**
 * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.hwccl.importor.users.service.persistence;

import com.hwccl.importor.users.model.Users;

import com.liferay.portal.service.persistence.BasePersistence;

/**
 * The persistence interface for the users service.
 *
 * <p>
 * Never modify or reference this interface directly. Always use {@link UsersUtil} to access the users persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
 * </p>
 *
 * <p>
 * Caching information and settings can be found in <code>portal.properties</code>
 * </p>
 *
 * @author Meanson Wang
 * @see UsersPersistenceImpl
 * @see UsersUtil
 * @generated
 */
public interface UsersPersistence extends BasePersistence<Users> {
	/**
	* Caches the users in the entity cache if it is enabled.
	*
	* @param users the users to cache
	*/
	public void cacheResult(com.hwccl.importor.users.model.Users users);

	/**
	* Caches the userses in the entity cache if it is enabled.
	*
	* @param userses the userses to cache
	*/
	public void cacheResult(
		java.util.List<com.hwccl.importor.users.model.Users> userses);

	/**
	* Creates a new users with the primary key. Does not add the users to the database.
	*
	* @param id the primary key for the new users
	* @return the new users
	*/
	public com.hwccl.importor.users.model.Users create(long id);

	/**
	* Removes the users with the primary key from the database. Also notifies the appropriate model listeners.
	*
	* @param id the primary key of the users to remove
	* @return the users that was removed
	* @throws com.hwccl.importor.users.NoSuchUsersException if a users with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.hwccl.importor.users.model.Users remove(long id)
		throws com.hwccl.importor.users.NoSuchUsersException,
			com.liferay.portal.kernel.exception.SystemException;

	public com.hwccl.importor.users.model.Users updateImpl(
		com.hwccl.importor.users.model.Users users, boolean merge)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Finds the users with the primary key or throws a {@link com.hwccl.importor.users.NoSuchUsersException} if it could not be found.
	*
	* @param id the primary key of the users to find
	* @return the users
	* @throws com.hwccl.importor.users.NoSuchUsersException if a users with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.hwccl.importor.users.model.Users findByPrimaryKey(long id)
		throws com.hwccl.importor.users.NoSuchUsersException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Finds the users with the primary key or returns <code>null</code> if it could not be found.
	*
	* @param id the primary key of the users to find
	* @return the users, or <code>null</code> if a users with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.hwccl.importor.users.model.Users fetchByPrimaryKey(long id)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Finds all the userses where screenName = &#63;.
	*
	* @param screenName the screen name to search with
	* @return the matching userses
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.hwccl.importor.users.model.Users> findByscreenName(
		java.lang.String screenName)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Finds a range of all the userses where screenName = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param screenName the screen name to search with
	* @param start the lower bound of the range of userses to return
	* @param end the upper bound of the range of userses to return (not inclusive)
	* @return the range of matching userses
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.hwccl.importor.users.model.Users> findByscreenName(
		java.lang.String screenName, int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Finds an ordered range of all the userses where screenName = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param screenName the screen name to search with
	* @param start the lower bound of the range of userses to return
	* @param end the upper bound of the range of userses to return (not inclusive)
	* @param orderByComparator the comparator to order the results by
	* @return the ordered range of matching userses
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.hwccl.importor.users.model.Users> findByscreenName(
		java.lang.String screenName, int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Finds the first users in the ordered set where screenName = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param screenName the screen name to search with
	* @param orderByComparator the comparator to order the set by
	* @return the first matching users
	* @throws com.hwccl.importor.users.NoSuchUsersException if a matching users could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.hwccl.importor.users.model.Users findByscreenName_First(
		java.lang.String screenName,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.hwccl.importor.users.NoSuchUsersException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Finds the last users in the ordered set where screenName = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param screenName the screen name to search with
	* @param orderByComparator the comparator to order the set by
	* @return the last matching users
	* @throws com.hwccl.importor.users.NoSuchUsersException if a matching users could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.hwccl.importor.users.model.Users findByscreenName_Last(
		java.lang.String screenName,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.hwccl.importor.users.NoSuchUsersException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Finds the userses before and after the current users in the ordered set where screenName = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param id the primary key of the current users
	* @param screenName the screen name to search with
	* @param orderByComparator the comparator to order the set by
	* @return the previous, current, and next users
	* @throws com.hwccl.importor.users.NoSuchUsersException if a users with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.hwccl.importor.users.model.Users[] findByscreenName_PrevAndNext(
		long id, java.lang.String screenName,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.hwccl.importor.users.NoSuchUsersException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Finds all the userses.
	*
	* @return the userses
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.hwccl.importor.users.model.Users> findAll()
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Finds a range of all the userses.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of userses to return
	* @param end the upper bound of the range of userses to return (not inclusive)
	* @return the range of userses
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.hwccl.importor.users.model.Users> findAll(
		int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Finds an ordered range of all the userses.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of userses to return
	* @param end the upper bound of the range of userses to return (not inclusive)
	* @param orderByComparator the comparator to order the results by
	* @return the ordered range of userses
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.hwccl.importor.users.model.Users> findAll(
		int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Removes all the userses where screenName = &#63; from the database.
	*
	* @param screenName the screen name to search with
	* @throws SystemException if a system exception occurred
	*/
	public void removeByscreenName(java.lang.String screenName)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Removes all the userses from the database.
	*
	* @throws SystemException if a system exception occurred
	*/
	public void removeAll()
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Counts all the userses where screenName = &#63;.
	*
	* @param screenName the screen name to search with
	* @return the number of matching userses
	* @throws SystemException if a system exception occurred
	*/
	public int countByscreenName(java.lang.String screenName)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Counts all the userses.
	*
	* @return the number of userses
	* @throws SystemException if a system exception occurred
	*/
	public int countAll()
		throws com.liferay.portal.kernel.exception.SystemException;
}